package com.sciencep.pro.core.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sciencep.pro.core.domain.dto.home.DailyReportReivewVO;
import com.sciencep.pro.core.domain.dto.home.MyMandyProgressVO;
import com.sciencep.pro.core.domain.dto.home.MyPowerExpendVO;
import com.sciencep.pro.core.domain.dto.project.BurndownChartTO;
import com.sciencep.pro.core.domain.dto.workdailylog.WorkDailyListResponseTO;
import com.sciencep.pro.core.domain.dto.workdailylog.WorkLogDetailTO;
import com.sciencep.pro.core.domain.dto.workdailylog.WorkdailyLogTO;
import com.sciencep.pro.core.domain.entity.UserWorkdailyLog;
import com.sciencep.pro.core.domain.vo.workdailylog.WorkDailyLogVo;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;
import java.util.Set;

/**
 * @author Sciencep
 */
public interface UserWorkdailyLogMapper extends BaseMapper<UserWorkdailyLog> {



    List<WorkDailyListResponseTO> getLogList(@Param("date") String date, @Param("userId") String userId);

    List<WorkLogDetailTO> getMyLog(@Param("startDate")LocalDate startDate,@Param("endDate")LocalDate endDate,String userId);

    Page<WorkdailyLogTO> getWorkDailyReviewList(Page<WorkdailyLogTO> page, @Param("workDailyLogVo") WorkDailyLogVo workDailyLogVo);

    Page<WorkdailyLogTO> getWorkDailyReviewListBack(Page<WorkdailyLogTO> page, @Param("workDailyLogVo") WorkDailyLogVo workDailyLogVo);

    List<WorkdailyLogTO> getWorkDailyReviewListExport(@Param("workDailyLogVo") WorkDailyLogVo workDailyLogVo);

    List<WorkdailyLogTO> exportWorkDailyReviewDetail(@Param("workDailyLogVo") WorkDailyLogVo workDailyLogVo);

    Page<WorkLogDetailTO> getWorkLogDetailTOPage(Page<WorkLogDetailTO> page, @Param("reviewStatus") Integer reviewStatus,@Param("beginDate") LocalDate beginDate,@Param("endDate")LocalDate endDate,@Param("userIds") Set<String> userIds,@Param("proNo") String proNo,@Param("managerId")String userId,@Param("proNos")Set<String> proNos,@Param("deptIds")Set<String> deptIds);

    Page<WorkLogDetailTO> getWorkLogDetailTOPageNew(Page<WorkLogDetailTO> page, @Param("reviewStatus") Integer reviewStatus, @Param("beginDate") LocalDate beginDate, @Param("endDate") LocalDate endDate, @Param("userIds") Set<String> userIds, @Param("proNo") String proNo, @Param("managerId") String userId, @Param("proUserIds") Set<String> proUserIds, @Param("deptIds") Set<String> deptIds, @Param("userSet") Set<String> userSet,@Param("proNos") Set<String> proNos);

    List<BurndownChartTO> getRealLeftWorkDay(String proNo);

    int selectCount(@Param("userWorkdailyLog") UserWorkdailyLog userWorkdailyLog);

    int isReview(@Param("userWorkdailyLog") UserWorkdailyLog userWorkdailyLog);

    List<DailyReportReivewVO> getToAuditLogByDeptManager(@Param("deptIds") Set<String> deptIds,@Param("userSet") Set<String> userSet);

    List<DailyReportReivewVO> getToAuditLogByProManager(String userId);

    List<DailyReportReivewVO> getReviewList(@Param("proUserIds") Set<String> proUserIds,@Param("proNos") List<String> proNos);

    List<MyPowerExpendVO> getMyPowerExpandVO(String userId);


    List<MyMandyProgressVO> getMyMandyProgressVO(String userId);

    Integer getSumPeople(@Param("date") String date);

    Integer getSubmit(@Param("date") String date);


    Integer getTodaySum(String date);

    Integer getSubmitToday(String date);
}
